package com.jb.platform.admin.controller;

import com.jb.platform.admin.entity.UserEntity;
import com.jb.platform.admin.service.UserService;
import com.jb.platform.core.pojo.page.PageParam;
import com.jb.platform.core.pojo.page.PageResult;
import com.jb.platform.core.pojo.result.RespResult;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;

/**
 * @author AnTi
 * @date 2024年05月13日
 */
@Controller
@RequestMapping("/user")
public class UserController {
    @Resource
    UserService userService;

    @RequestMapping("/getPage")
    @ResponseBody
    public PageResult<UserEntity> getPage(PageParam pageParam,String name){
        PageResult<UserEntity> res= userService.getPage(pageParam,name);
        return res;
    }

    @GetMapping("/test")
    @ResponseBody
    public RespResult test(){
        return new RespResult<>("su");
    }
}
